<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('风速统计列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <p>类型：</p>
                                <select name="type">
                                    <option value="1">日数据</option>
                                    <option value="2">月数据</option>
                                    <option value="3">年数据</option>
                                    <option value="">所有</option>
                                </select>
                            </li>
                            <li>
                                <p>状态：</p>
                                <select name="status">
                                	<option value="1">有效</option>
									<option value="0">无效</option>
								</select>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
            	<!--  
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:datatotal:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:datatotal:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                -->
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:datatotal:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:datatotal:export">
                    <i class="fa fa-download"></i> 导出
                 </a>
                      单位:(次数)
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table" data-mobile-responsive="true"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('system:datatotal:edit')}]];
        var removeFlag = [[${@permission.hasPermi('system:datatotal:remove')}]];
        var prefix = ctx + "system/datatotal";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "风速统计",
                columns: [{
                    checkbox: true
                },
                {
                    field : 'id', 
                    title : '序号'
                },
                {
                    field : 'eastNum', 
                    title : '东风'
                },
                {
                    field : 'eastSpeed', 
                    title : '东风均速',
                    visible: false
                },
                {
                    field : 'westNum', 
                    title : '西风'
                },
                {
                    field : 'westSpeed', 
                    title : '西风均速',
                    visible: false
                },
                {
                    field : 'southNum', 
                    title : '南风'
                },
                {
                    field : 'southSpeed', 
                    title : '南风均速',
                    visible: false
                },
                {
                    field : 'northNum', 
                    title : '北风'
                },
                {
                    field : 'northSpeed', 
                    title : '北风均速',
                    visible: false
                },
                {
                    field : 'northeastNum', 
                    title : '东北风'
                },
                {
                    field : 'northeastSpeed', 
                    title : '东北风均速',
                    visible: false
                },
                {
                    field : 'northwestNum', 
                    title : '西北风'
                },
                {
                    field : 'northwestSpeed', 
                    title : '西北风均速',
                    visible: false
                },
                {
                    field : 'southeastNum', 
                    title : '东南风'
                },
                {
                    field : 'southeastSpeed', 
                    title : '东南风均速',
                    visible: false
                },
                {
                    field : 'southwestNum', 
                    title : '西南风'
                },
                {
                    field : 'southwestSpeed', 
                    title : '西南风均速',
                    visible: false
                },
                {
                    field : 'nneSpeed', 
                    title : '北东北',
                    visible: false
                },
                {
                    field : 'nneNum', 
                    title : '北东北'
                },
                {
                    field : 'eneSpeed', 
                    title : '东东北',
                    visible: false
                },
                {
                    field : 'eneNum', 
                    title : '东东北'
                },
                {
                    field : 'sseSpeed', 
                    title : '南东南',
                    visible: false
                },
                {
                    field : 'sseNum', 
                    title : '南东南'
                },
                {
                    field : 'eseSpeed', 
                    title : '东东南',
                    visible: false
                },
                {
                    field : 'eseNum', 
                    title : '东东南'
                },
                {
                    field : 'sswSpeed', 
                    title : '南西南',
                    visible: false
                },
                {
                    field : 'sswNum', 
                    title : '南西南'
                },
                {
                    field : 'wswSpeed', 
                    title : '西西南',
                    visible: false
                },
                {
                    field : 'wswNum', 
                    title : '西西南'
                },
                {
                    field : 'nnwSpeed', 
                    title : '北西北',
                    visible: false
                },
                {
                    field : 'nnwNum', 
                    title : '北西北'
                },
                {
                    field : 'wnwSpeed', 
                    title : '西西北',
                    visible: false
                },
                {
                    field : 'wnwNum', 
                    title : '西西北'
                },
                {
                    field : 'type', 
                    title : '类型 1日 2 月 3年',
                    visible: false
                },
                {
                    field : 'status', 
                    title : '状态 0无效 1有效',
                    visible: false
                },
                {
                    field : 'createTime', 
                    title : '统计时间'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                       // actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>